<template>
<!--  搜索的两张卡片-->
<div class="myCharts">
  <span class="title">{{ title }}<i class="tip">&#xe617</i></span>
  <div class="num"><h2>{{ num }}</h2><span>{{ rate }}</span>
    <slot name="icon"></slot>
  </div>
  <div style="width: 100%;height: 74px;margin-top: 15px"><e-chart-component :option="option"></e-chart-component></div>
</div>
</template>

<script>
import EChartComponent from '@/views/EChartComponent'

export default {
  name: "SearchDetail",
  components:{
    EChartComponent
  },
  props:['title','num','option','rate']
}
</script>

<style scoped>
.myCharts {
  width: 100%;
  height: 100%;
  padding-top: 12px;
}
.title {
  font-size: 16px;
  color: #5a5e66;
  margin-right: 10px;
}

.tip {
  font-style: normal;
  font-family: 'iconfont';
  color: #7d7b7b;
  font-size: 16px;
  font-weight: 700;
  margin-left: 12px;
}

.num {
  display: flex;
}
.num h2 {
  margin: 0;
  padding: 0;
  font-weight: 400;
}
.num span {
  margin-left: 30px;
  line-height: 30px;
}

.num svg {
  width: 14px;
  height: 14px;
  margin-top: 5px;
  margin-left: 5px;
}
</style>
